<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:body onload="foco();">
	<ui:composition template="../template.xhtml">
		<ui:define name="miolo">
		   	<p:growl id="erros"/> 
		    <h:form id="DERelatorio">
				<p:panel id="panel" header="Reclassificação de TE">
					<table width="100%">
						<tr>
							<td>
								<div
									style="overflow: auto; width: 100%; height: 500px; border: 1px solid #C0C0C0;">
									<table>
										<tr>
											<td><p:pickList value="#{reclassificacaoFrm.colecaoGene}"
													var="item" itemLabel="#{item}" itemValue="#{item}" required="true" requiredMessage="Selecione o(s) gene(s) para Reclassificar">
													<f:facet name="sourceCaption">
														<h:outputText value="#{msgs.todosGenes}"/>
													</f:facet>
													<f:facet name="targetCaption">
														<h:outputText value="#{msgs.genesSelecionados}"/>
													</f:facet>
												</p:pickList></td>
											<td>&nbsp;</td>
										</tr>
										<tr>
											<td>
												<p:commandButton
													value="#{msgs.blastExecute}" 
													actionListener="#{reclassificacaoFrm.executeBlast}"
													update="tabela,erros" />
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<div>
									<table>
						
									
									</table>
								</div>
							</td>
						</tr>
					</table>
				</p:panel>
				
				
					<p:dataList value="#{reclassificacaoFrm.colecaoBlast}" var="item" id="tabela"  
        								paginator="true" rows="5" effectSpeed="fast"  
        								paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"  
        								rowsPerPageTemplate="5,10,15">  
   
            							<h:commandButton value="Submit">
    										<f:setPropertyActionListener value="#{item}" target="#{reclassificacaoFrm.result}" />
										</h:commandButton>  
  
            							<h:outputText value="#{item.nomeQuery}" style="margin-left:10px" />  
            							<br />  
    								</p:dataList>  
      
    								<p:dialog header="Detalhe do TE" visible="false" widgetVar="teDialog" modal="true" showEffect="fade">  
        								<p:outputPanel id="teDetail" style="text-align:center;" layout="block">  
              									<h:outputLabel for="modelNo" value="Model No: " />  
                								<h:outputText id="modelNo" value="#{reclassificacaoFrm.result.score}" />  
                								<h:outputLabel for="year" value="Year: " />  
                								<h:outputText id="year" value="#{reclassificacaoFrm.result.identidade}" />  
       	 								</p:outputPanel> 
       	 						  </p:dialog>

			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>

